<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%book_chapter}}".
 *
 * @property integer $id
 * @property integer $book_id
 * @property integer $source
 * @property integer $bid
 * @property string $chapters
 */
class BookChapter extends Common
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%book_chapter}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['book_id', 'bid', 'chapters', 'latest_chapters'], 'required'],
            [['book_id', 'source', 'bid'], 'integer'],
            [['chapters', 'latest_chapters'], 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'book_id' => '书ID',
            'source' => '来源',
            'bid' => '来源书ID',
            'chapters' => '章节ID',
            'latest_chapters' => '最新章节',
        ];
    }
}
